import React from 'react'
import {useDispatch} from 'react-redux'

const Login = () => {
    //action
    // {type:'login',payload:{a:100}}
    const dispatch = useDispatch();
    const login = ()=>{
        dispatch({type:'login'})//没有传值
    }
    return (
        <div>
            Login
            <button onClick={login}>登录</button>
        </div>
    )
}

export default Login
